<template>
  <div class="zuida">
    <div class="xia">
       <el-table
    :data="tableData"
    border
    style="width: 100%">
    <el-table-column
      prop="name"
      label="操作人ID"
      width="150">
    </el-table-column>
    <el-table-column
      fixed
      prop="time"
      label="操作时间"
      width="300">
    </el-table-column>
    <el-table-column
      prop="classname"
      label="操作类名"
      width="360">
    </el-table-column>
    <el-table-column
      prop="methodname"
      label="操作方法"
      width="200">
      
    </el-table-column>
    <el-table-column
      prop="needtime"
      label="操作用时(ms)"
      width="120">
    </el-table-column>
  </el-table>
  <!-- --分页-- -->
   <div class="block">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :page-sizes="[10, 20, 50, 100]"
      :page-size="10"
      layout="total, sizes, prev, pager, next, jumper"
      :total="count">
      <!-- 页数 -->
    </el-pagination>
    </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      sum:10,
      page:0,
      multipleSelection:[],
          name: '',
          time:'',
          classname:'',
          methodname:'',
          needtime:'',
      sizeForm: {
          name: '',
          time:'',
          classname:'',
          methodname:'',
          needtime:''
        },
        tableData:'',
      token:''
      }
  },
  mounted(){
      // // this.axios.get("/selectstudentAll/"+1/2).then((res)=>{
      // this.student();
      this.token=localStorage.getItem('token')
      // console.log(this.token);
      this.$store.commit('isShow')
      this.search()
      
    },
  methods: {
    search(){
      this.axios.get("/rizhi/"+this.page+"/"+this.sum,{
        headers:{
              token:this.token,
              
            }
      }).then((res)=>{
        if(res.data.msg!="error"){
                this.tableData=res.data.data.fengye;
        this.count=res.data.data.count;
              }
              else{
                this.$message({
               showClose: true,
               message: '抱歉!你还未登录!',
               type: 'warning'
                });
                this.$router.push("/")
              }
        // console.log(res);
        
      })
    },
    getsex(e){
      // console.log(e);
      this.sex=e
    },
      handleSizeChange(val) {
        this.sum=val;
        //条数
        // this.student();
        this.search()
      },
      handleCurrentChange(val) {
        //页数
        this.page=(val-1)*this.sum;
        // this.student();
        this.search()
      },
      handleSelectionChange(val) {
        for(var i=0;i<val.length;i++){
          this.multipleSelection[i]=val[i].id;
        }
      }
    }
    
}
</script>
<style lang="less" scoped>
  .zuida{
    width: 100%;
    height: 100%;
  }
  .xia{
    // margin-left:80px;
    margin-top: 50px;
  }
  .student{
  width: 100%;
  height: 500px;
}
.index{
    margin-left: 20px;
    width: 100%;
    height: 36px;
    line-height: 36px;
  }
  /deep/ .el-dialog__body{
    font-size: 16px;
    padding: 10px 20px;
  }
  /deep/ .el-dialog{
    width: 30%;
  }
  /deep/ .el-divider--horizontal{
    padding: 0;
    margin: 0;
  }
  /deep/ .el-form-item__label{
    padding: 0;
  }
   .demo-httpRequestImg{
    /deep/ .el-upload--picture-card{
        display: none;
    }
  } 
  .zuida{
    /deep/ .el-upload--picture-card{
      border: 1px dashed #c0ccda00;
}
  }
</style>